<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo ($title); ?></title>
<link rel="stylesheet" href="/Css/Admin/common.css" />
<script type="text/javascript" src="/Js/jquery-1.9.1.min.js"></script>
</head>

<body>

<link rel="stylesheet" href="/Css/ui-lightness/jquery-ui-1.10.4.custom.css" />

<script type="text/javascript" src="/Js/jquery-ui-1.10.4.custom.js"></script>

<script type="text/javascript" src="/Js/ZeroClipboard.js"></script>
<script type="text/javascript" src="/Js/jquery.form.js"></script>
<script type="text/javascript" src="/Js/common.js"></script>
<script type="text/javascript" src="/Js/adm/task/batch_order_list.js"></script>
    
    <div class="navigate">
		<h1>订单列表</h1>
		<a class="button fr" href="/index.php/Admin/Task/">任务列表</a>
  	</div>
  	

	<!-- 汇总 -->
	<div id="div_summary" task_id="<?php echo ($task["task_id"]); ?>">
		<table>
	<tr>
		<td class="w300">
			<span style="color:red;font-size:24px !important;font-weight:bold;">
				<?php echo ($task["plantform_name"]); ?>:
				<a href="<?php echo ($task["shop_url"]); ?>" target="_blank">
					<?php echo ($task["shop_name"]); ?>
				</a>
			</span>
		</td>
		<td class="w200">开始时间:<span class="red"><?php echo ($task["begin_time"]); ?></span></td>
		<td class="w200">结束时间:<span class="red"><?php echo ($task["end_time"]); ?></span></td>
		<td>单量:<span class="red"><?php echo ($summary["order_count"]); ?></span></td>
	</tr>
	<tr>
		
		<td>实际总金额:<span class="red"><?php echo ($summary["order_money"]); ?></span></td>
		<td>用券订单量:<span class="red"><?php echo ($summary["use_bonus_order"]); ?></span></td>
		<td>用券总金额:<span class="red"><?php echo ($summary["bonus_money"]); ?></span></td>
		<td>券后总金额:<span class="red"><?php echo ($summary["paid_amount"]); ?></span></td>
	</tr>
</table>
	</div>
	<!-- 汇总 -->
	
		
		
		

		
		
	<!-- 分配订单 -->
	<div class="explain-col">
	
		<input type="button" value="1.分配帐号" id="btnAssignMember" />

		<input type="button" value="2.分配下单URL" id="btnAssignURL" />
		
		<input type="button" value="3.分配收货地址" id="btnAssignAddress" />
		
		刷手:
		<select name="order_admin_id" id="order_admin_id" style="width:200px;">
			<?php if(is_array($admins)): $i = 0; $__LIST__ = $admins;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$a): $mod = ($i % 2 );++$i;?><option value="<?php echo ($a["id"]); ?>"><?php echo ($a["real_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
        </select>
        
        <input type="button" value="4.确认分配" id="btnAssignOrder" />
        
		<label for="amount">选取订单范围:</label>
				
		<div id="slider-range" style="width:300px;display: inline-block;"></div>
		
		<input type="text" id="range" class="tc" style="width:80px;border:0; color:#f6931f; font-weight:bold;">
		
		<?php if($task['task_status'] == TS_FINISH): ?>5.执行完毕
		<?php else: ?>
			<input type="button" value="5.执行完毕" id="btnFinish" <?php if($can_task_finished == 0): ?>disabled title="协调员和超级管理员才能执行完毕"<?php endif; ?> /><?php endif; ?>
		
		<?php if($can_reset_member_id): ?><input type="button" value="6.重置帐号" id="btnResetMemberId" /><?php endif; ?>
				
	</div>		
	<!-- 分配订单 -->
	
	
	
		<!-- 备注 -->
		<div id="div_comment" class="explain-col">
		
		备注:<span class="red"><?php echo ($task_logs_count); ?></span>条
			
		
		<span id="sp_last_log">
		<?php echo ($last_log["real_name"]); ?> - <?php echo ($last_log["message"]); ?> - <?php echo ($t["task_status_name"]); ?> - <?php echo ($t["pay_status_name"]); ?> - <?php echo ($last_log["created"]); ?>
		</span>
		
		
	<form id="form_task_log" class="hidden" action="/index.php/Admin/Task/task_log_add" method="post">
		<table cellpadding="2" cellspacing="1" class="table_form">
	
		<tr>
			
			<th style="width:80px;">序号</th>			
			<th style="width:200px;">内容</th>
			<th style="width:80px;">管理员</th>
			<th style="width:80px;">任务状态</th>
			<th style="width:80px;">支付状态</th>
			<th style="width:150px;">添加日期</th>
		</tr>
	
		<?php if(is_array($task_logs)): $i = 0; $__LIST__ = $task_logs;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$t): $mod = ($i % 2 );++$i;?><tr>
			
			<td class="tc"><?php echo ($t["no"]); ?></td>
			<td class="tl"><?php echo ($t["message"]); ?></td>
			<td class="tc"><?php echo ($t["real_name"]); ?></td>			
			<td class="tc"><?php echo ($t["task_status_name"]); ?></td>
			<td class="tc"><?php echo ($t["pay_status_name"]); ?></td>
			<td class="tc"><?php echo ($t["created"]); ?></td>		
		</tr><?php endforeach; endif; else: echo "" ;endif; ?>
		
		<?php if($is_task_log_add): ?><tfoot>
		
			<tr>
				<td>留言备注:</td>
				<td>
					<textarea name="message" id="message" rows="2" cols="100"></textarea>
					<span class="color-red" title="必填">*</span>
				</td>
				<td>
				</td>
				<td></td>
			</tr>
			
			
			
			<tr>
				<td></td>
				<td>
					<input type="submit" class="button" value="提交" />
					<input type="button" class="button hidden" value="隐藏备注" id="btnHideComment" />
				</td>
				<td>
					
				</td>
				<td></td>
			</tr>
		</tfoot><?php endif; ?>
	</table>
	
	<input type="hidden" name="task_id" id="task_id" value="<?php echo ($task["task_id"]); ?>" />
	
	</form>
		
	</div>
	<!-- 备注 -->
	
	
	
	
	<!-- 订单列表 -->
	<table width="100%" cellpadding="2" cellspacing="1" class="table_form td-hidden">
	
		<tr>
			<th class="w20">
				<input type="checkbox" id="check_all" />
			</th>
			<th class="w40"><div class="short_text" title="订单编号">订单<br />编号</div></th>
			<th class="w40"><div class="short_text" title="刷手">刷手</div></th>
			<th class="w40"><div class="short_text" title="帐号">帐号</div></th>
			<th class="w40"><div class="short_text" title="登录密码">登录<br />密码</div></th>
			<th class="w40"><div class="short_text" title="支付密码">支付<br />密码</div></th>
			<th class="w40"><div class="short_text" title="下单URL">下单<br />URL</div></th>
			<th class="w20"><div class="short_text" title="订单号">订单号</div></th>
			<th class="w20"><div class="short_text" title="快递公司">快递<br />公司</div></th>
			<th class="w20"><div class="short_text" title="快递单号">快递<br />单号</div></th>
			<th class="w40"><div class="short_text" title="收货人">收货人</div></th>
			<th class="w80"><div class="" title="收货地址">收货地址</div></th>
			<th class="w40"><div class="short_text" title="电话">电话</div></th>
			<th class="w40"><div class="short_text" title="产品链接">产品<br />链接</div></th>
			<th class="w40"><div class="short_text" title="产品名称">产品<br />名称</div></th>
			<th class="w40"><div class="short_text" title="关键词">关键词</div></th>
			<th class="w40"><div class="short_text" title="购买量">购买量</div></th>
			<th class="w40"><div class="short_text" title="刷单价">刷单价</div></th>
			<th class="w40"><div class="short_text" title="最终价">最终价</div></th>
			<th class="w40"><div class="short_text" title="实际总金额">实际<br />总金额</div></th>
			<th class="w20"><div class="short_text" title="用券金额">用券<br />金额</div></th>
			<th class="w40"><div class="short_text" title="券后金额">券后<br />金额</div></th>
			<th class="w40"><div class="short_text" title="运费">运费</div></th>
			<th class="w40"><div class="short_text" title="评论">评论</div></th>
			<th class="w40"><div class="short_text" title="备注">备注</div></th>
		</tr>
	
		<?php if(is_array($orders)): $i = 0; $__LIST__ = $orders;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$o): $mod = ($i % 2 );++$i;?><tr>
			<th class="<?php if(($o["order_admin_id"]) > "0"): ?>bg-lavender<?php endif; ?>">
				
				<input type="checkbox" name="check_orders" id="orders_<?php echo ($o["order_id"]); ?>" value="<?php echo ($o["order_id"]); ?>" />
				
			</th>
			
			<td class="tc">
				<a id="is_exception-<?php echo ($o["order_id"]); ?>" order_id="<?php echo ($o["order_id"]); ?>" name="is_exception" style="cursor:pointer;" <?php if(($o["is_exception"]) == "1"): ?>class="color-red" title="异常订单"<?php endif; ?>><?php echo ($o["order_id"]); ?></a>
			</td>
			<td class="tc">
				<div class="short_text"><?php echo ($o["real_name"]); ?></div>
			</td>
			<td class="tr" title="<?php echo ($o["member_name"]); ?>">
				
				<div id="member_name_clip_container-<?php echo ($o["order_id"]); ?>" style="position:relative">
					<div prefix="member_name" id="member_name_clip_button-<?php echo ($o["order_id"]); ?>" class="my_clip_button short_text"><?php echo ($o["member_name"]); ?></div>
				</div>
		
			</td>
			<td class="tr" title="<?php echo ($o["member_pwd"]); ?>">
			
				<div id="member_pwd_clip_container-<?php echo ($o["order_id"]); ?>" style="position:relative">
					<div prefix="member_pwd" id="member_pwd_clip_button-<?php echo ($o["order_id"]); ?>" class="my_clip_button short_text"><?php echo ($o["member_pwd"]); ?></div>
				</div>
				
			</td>
			<td class="tr" title="<?php echo ($o["member_pay_pwd"]); ?>">
				<div id="member_pay_pwd_clip_container-<?php echo ($o["order_id"]); ?>" style="position:relative">
					<div prefix="member_pay_pwd" id="member_pay_pwd_clip_button-<?php echo ($o["order_id"]); ?>" class="my_clip_button short_text"><?php echo ($o["member_pay_pwd"]); ?></div>
				</div>
			</td>
			<td class="tc">
				<a href="<?php echo ($o["order_url"]); ?>" target="_blank" title="<?php echo ($o["order_url"]); ?>" class=""><div class="short_text"><?php echo ($o["order_url"]); ?></div></a>
			</td>
			<td>
				<input type="text" class="tr w40" id="order_sn-<?php echo ($o["order_id"]); ?>" name="order_sn" value="<?php echo ($o["order_sn"]); ?>" />
			</td>
			<td>
				<select name="shippings" id="shipping-<?php echo ($o["order_id"]); ?>" class="w40">
					<option value="0"></option>
					<?php if(is_array($shippings)): $i = 0; $__LIST__ = $shippings;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$s): $mod = ($i % 2 );++$i;?><option value="<?php echo ($s["shipping_id"]); ?>"<?php if($s["shipping_id"] == $o['shipping_id']): ?>selected<?php endif; ?>><?php echo ($s["shipping_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
		        </select>
        
			</td>
			<td>
				<input type="text" class="tr w40" id="invoice_no-<?php echo ($o["order_id"]); ?>" name="invoice_no" value="<?php echo ($o["invoice_no"]); ?>" />
			</td>
			<td class="tc" title="<?php echo ($o["consignee"]); ?>">
			
			
				<div id="consignee_clip_container-<?php echo ($o["order_id"]); ?>" style="position:relative">
					<div prefix="consignee" id="consignee_clip_button-<?php echo ($o["order_id"]); ?>" class="my_clip_button short_text"><?php echo ($o["consignee"]); ?></div>
				</div>
				
			</td>
			<td class="tl" title="<?php echo ($o["address"]); ?>">
			
				<div id="address_clip_container-<?php echo ($o["order_id"]); ?>" style="position:relative">
					<div prefix="address" id="address_clip_button-<?php echo ($o["order_id"]); ?>" class="my_clip_button short_text" style="width:130px;"><?php echo ($o["address"]); ?></div>
				</div>
				
			</td>
			<td class="tc" title="<?php echo ($o["mobile_phone"]); ?>">
				<div id="mobile_phone_clip_container-<?php echo ($o["order_id"]); ?>" style="position:relative">
					<div prefix="mobile_phone" id="mobile_phone_clip_button-<?php echo ($o["order_id"]); ?>" class="my_clip_button short_text"><?php echo ($o["mobile_phone"]); ?></div>
				</div>
					
			</td>
			<td class="tc">
				<div class="short_text" title="<?php echo ($o["goods_url"]); ?>"><a href="<?php echo ($o["goods_url"]); ?>" target="_blank"><?php echo ($o["goods_url"]); ?></a>
			</td>
			<td>
				<div class="short_text" title="<?php echo ($o["goods_name"]); ?>"><a href="<?php echo ($o["goods_url"]); ?>" target="_blank"><?php echo ($o["goods_name"]); ?></a>
			</td>
			<td class="tc" title="<?php echo ($o["keywords"]); ?>">
								
				<div id="keywords_clip_container-<?php echo ($o["order_id"]); ?>" style="position:relative">
					<div prefix="keywords" id="keywords_clip_button-<?php echo ($o["order_id"]); ?>" class="my_clip_button short_text"><?php echo ($o["keywords"]); ?></div>
				</div>
				
			</td>
			<td class="tc">
				<div class="short_text" title="<?php echo ($o["goods_number"]); ?>"><?php echo ($o["goods_number"]); ?></div>
			</td>
			<td class="tr">
				<div class="short_text" title="<?php echo ($o["goods_amount"]); ?>"><?php echo ($o["goods_amount"]); ?></div>
			</td>
			<td class="tr">
				<?php echo ($o["final_price"]); ?>
			</td>
			<td class="tr">
				<span id="real_price-<?php echo ($o["order_id"]); ?>"><?php echo ($o["real_price"]); ?></span>
				
			</td>
			<td>
				<input type="text" class="tr w40" id="bonus_money-<?php echo ($o["order_id"]); ?>" name="bonus_money" value="<?php echo ($o["bonus_money"]); ?>" />
			</td>
			<td>
				<input type="text" class="tr w40" id="paid_amount-<?php echo ($o["order_id"]); ?>" name="paid_amount" value="<?php echo ($o["paid_amount"]); ?>" />
			</td>
			<td>
				<input type="text" class="tr w40" id="shipping_fee-<?php echo ($o["order_id"]); ?>" name="shipping_fee" value="<?php echo ($o["shipping_fee"]); ?>" />
			</td>
			<td class="tl" title="<?php echo ($o["comment"]); ?>">
				
				<div id="comment_clip_container-<?php echo ($o["order_id"]); ?>" style="position:relative">
					<div prefix="comment" id="comment_clip_button-<?php echo ($o["order_id"]); ?>" class="my_clip_button short_text"><?php echo ($o["comment"]); ?></div>
				</div>
				
				
			</td>
			<td class="tl">
				<input type="text" class="tl w40" id="remark-<?php echo ($o["order_id"]); ?>" name="remark" value="<?php echo ($o["remark"]); ?>" title="<?php echo ($o["remark"]); ?>" />
			</td>
		</tr><?php endforeach; endif; else: echo "" ;endif; ?>
	</table>
	<!-- 订单列表 -->
	
	
	<div class="btn">
		<p></p>
<div class="tc" style="padding:10px 0px 10px 0px;">
<?php echo ($pager); ?>
</div>
    </div>
    


</body>
</html>